﻿<UserControl x:Class="MDSAdministration.ColumnCompare"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:listExample="clr-namespace:MDSAdministration"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Background="AliceBlue">
        <Grid.RowDefinitions>
            <RowDefinition Height="26" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Height="26" VerticalAlignment="Top" HorizontalAlignment="Stretch">
            <Border BorderThickness="1" BorderBrush="#FF8E8F8F">
                <Grid>
                    <CheckBox Height="16" HorizontalAlignment="Left" Margin="5,6,0,0" Name="checkBox" VerticalAlignment="Top" />
                    <Label Content="Col2" Margin="24,0,0,0" Name="lblColumnHeaderName" />
                </Grid>
            </Border>
        </Grid>
        <Grid VerticalAlignment="Stretch"  Margin="0,26,0,0" Grid.RowSpan="2" HorizontalAlignment="Stretch">
            <DataGrid HeadersVisibility="Column" AutoGenerateColumns="False"  HorizontalAlignment="Stretch"  Name="dataGrid1" VerticalAlignment="Stretch"  CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" ScrollViewer.VerticalScrollBarVisibility="Hidden" IsReadOnly="True">
                <DataGrid.Resources>
                    <Style TargetType="ScrollViewer">
                        <Setter Property="listExample:ScrollSynchronizer.ScrollGroup" Value="Group1" />
                    </Style>
                </DataGrid.Resources>
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Col1" Binding="{Binding Col1}" Width="*" x:Name="dgtcCol1">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="Background" Value="{Binding Col1Colour}" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>
                    <DataGridTextColumn Header="Col2" Binding="{Binding Col2}" Width="*" x:Name="dgtcCol2">
                        <DataGridTextColumn.ElementStyle>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="Background" Value="{Binding Col2Colour}" />
                            </Style>
                        </DataGridTextColumn.ElementStyle>
                    </DataGridTextColumn>
                </DataGrid.Columns>
            </DataGrid>
        </Grid>
    </Grid>
</UserControl>
